﻿<%@ Page Language="C#" MasterPageFile="~/Main/AdminPage.master" AutoEventWireup="true" CodeFile="AdverList.aspx.cs" Inherits="Main_AdverList" Title="首页图文" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:GridView ID="gvadver" runat="server"
            AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" 
            BorderStyle="None" BorderWidth="1px" DataKeyNames="Aid" CellPadding="3" OnRowUpdating="gvadver_RowUpdating">
        <Columns>
            <asp:BoundField DataField="Aid" HeaderText="编号" />
            <asp:TemplateField HeaderText="图片">
                <ItemTemplate>
                    <asp:Image ID="Image1" runat="server" Height="100px" Width="200px" 
                        ImageUrl='<%# Eval("Aurl") %>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="名称">
                <ItemTemplate>
                    <asp:TextBox ID="txtname" runat="server" Text='<%# Eval("Aurl") %>'></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="链接">
                <ItemTemplate>
                    <asp:TextBox ID="txtlink" runat="server" Text='<%# Eval("Alink") %>' Width="250px"></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="修改">
                <ItemTemplate>
                    <asp:LinkButton ID="lbupdate" runat="server" 
                            CommandArgument='<%# Eval("Aid") %>' CommandName="update">修改</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle CssClass="FooterStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
        <PagerStyle CssClass="PagerStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
        <SelectedRowStyle CssClass="SelectedRowStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
        <HeaderStyle CssClass="HeaderStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
        <EditRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
        <AlternatingRowStyle CssClass="AlternatingRowStyle" HorizontalAlign="Center" VerticalAlign="Middle" />
    </asp:GridView>
    上传图片：<asp:FileUpload ID="fudphoto" runat="server"/>
    <asp:Button ID="btnupload" runat="server" OnClick="btnupload_Click" Text="上传" />
</asp:Content>

